package com.youdo.uvccamera;

import android.os.Environment;

import com.serenegiant.encoder.MediaMuxerWrapper;

/**
 * 执法仪(Youdotech PR6K8:Android 5.1.1 = API Level 22)
 */
public class CameraConstants {

    /**
     * 默认视频的分辨率
     * 想要设置为 1280 × 720,录制后生成的图片和视频 为1280 × 720,by ljb 20250212;
     * Set resolution to 1280 × 720, hard resolved(using MediaCodec),by ljb 20250212;
     */
    public static final int DEFAULT_WIDTH = 640;
    public static final int DEFAULT_HEIGHT = 480;
    //public static final int DEFAULT_WIDTH = 1280;//640
    // public static final int DEFAULT_HEIGHT = 720;//480
    // CameraClient
    public static final int MSG_SELECT = 0;
    public static final int MSG_CONNECT = 1;
    public static final int MSG_DISCONNECT = 2;
    public static final int MSG_ADD_SURFACE = 3;
    public static final int MSG_REMOVE_SURFACE = 4;
    public static final int MSG_START_RECORDING = 6;
    public static final int MSG_STOP_RECORDING = 7;
    public static final int MSG_CAPTURE_STILL = 8;
    public static final int MSG_RESIZE = 9;
    // CameraServer
    public static final int MSG_OPEN = 10;
    public static final int MSG_CLOSE = 11;
    public static final int MSG_PREVIEW_START = 12;
    public static final int MSG_PREVIEW_STOP = 13;
    public static final int MSG_CAPTURE_START = 6;
    public static final int MSG_CAPTURE_STOP = 7;
    public static final int MSG_MEDIA_UPDATE = 17;


    public static final int MSG_ACTION_SET = 20;
    public static final int MSG_SET_ORIENTATION = 21;
    public static final int MSG_RELEASE = 99;

    // 设置摄像头参数
    /**
     * 设置模式
     */
    public static final int ACTION_SET_DEBUG_MODE = 30;
    /**
     * 设置分段录像时间(单位分)
     */
    public static final int ACTION_SET_SEGMENT_PERIOD = 31;
    /**
     * 设置帧数据回调
     */
    public static final int ACTION_SET_FRAME_CALLBACK = 32;

    /**
     * 设置拍照/录像保存模式(0-内存低时删除掉最早一天的文件夹,1-覆盖模式/极端情况,只存2个,一个是上次录的，一个是当前在录的)
     */
    public static final int ACTION_SET_SAVE_MODE = 33;
    /**
     * 设置拍照/录像保留路径(如TF卡路径:/storage/E2FA-0D00/youdo/--->/storage/E2FA-0D00/youdo/Video/2025-06-27/)
     */
    public static final int ACTION_SET_SAVE_PATH = 34;
    // 获取摄像头参数
    public static final int ACTION_GET_SAVE_MOVIES_PATH = 35;
    public static final int ACTION_GET_SAVE_PICTURE_PATH = 36;
    public static final int ACTION_SET_AUDIO_RECORD = 37;

    // 传参
    public static final String ACTION_KEY = "action_key";
    // 默认保存地址
    // public static final String DEFAULT_SAVE_PATH = MediaMuxerWrapper.getCaptureFile(Environment.DIRECTORY_DCIM).getAbsolutePath();
    public static final String DEFAULT_SAVE_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/yd";

}
